<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/
include 'inc/PAGE.php';
$p = new PAGE("");

$loginOk = $p->s()->getvar("loginOk");
$username = $p->s()->getvar("username");
$type = $p->s()->getvar("type");

if($loginOk==1  && strlen($username)>0 && $type==LIB) {
    $id = $_GET['id'];
    $sql = "DELETE FROM books WHERE id = ".$id;
    $p->db()->insert($sql);
    header("Location: ./ze_book_search.php");
}else {
    header("Location: ./index.php");
}
?>
<a href="index.php"><br/>index.php</a>